import request from "@/utils/request";

const api = {
    // 根据ID获取
    getInfo(id) {
        return request({
            url: `/api/BaseData/Artroute/${id}`,
            method: "get"
        });
    },
    // 查询信息
    getList(query) {
        return request({
            url: `/api/BaseData/Artroute`,
            method: "GET",
            data: query
        });
    },
    getStationAlldata() {
        return request({
            url: "/api/BaseData/Artroute/GetDetailStationInfo",
            method: "get"
        });
    },
    // 创建
    create(dataForm) {
        return request({
            url: `/api/BaseData/Artroute`,
            method: "post",
            data: dataForm
        });
    },
    // 更新
    update(dataForm) {
        return request({
            url: "/api/BaseData/Artroute/" + dataForm.id,
            method: "PUT",
            data: dataForm
        });
    },
    // 删除
    delete(id) {
        return request({
            url: `/api/BaseData/Artroute/${id}`,
            method: "DELETE"
        });
    },
    // 根据ID批量删除
    batchDelete(ids) {
        return request({
            url: `/api/BaseData/Artroute/batchRemove`,
            method: "POST",
            data: ids
        });
    },
    // 根据查询条件导出数据
    export(query) {
        return request({
            url: `/api/BaseData/Artroute/Actions/Export`,
            method: "GET",
            data: query
        });
    }
};

export default api;

export const getDefactAll = api.getAll;
